export default defineEventHandler(async (event) => {
  const body = await readBody(event)
  const memo = await event.context.prisma.memo.create({
    data: {
      authorId: event.context.user.id,
      ...body
    }
  })
  return memo
})
